package itdep.domain.address;

import itdep.domain.NamedEntity;

import javax.persistence.*;

/**
 * @author Ivan Khalopik
 * @version $Revision: 9 $ $Date: 2010-06-15 22:29:57 +0000 (Tue, 15 Jun 2010) $
 */
@Entity
@Table(name = "CITY")
public class City extends NamedEntity {

	@Column(name = "CITY_CODE", nullable = true)
	private String cityCode;

	@ManyToOne
	@JoinColumn(name = "ID_SETTLEMENT", nullable = false)
	private Settlement settlement;

	@ManyToOne
	@JoinColumn(name = "ID_CITY_TYPE", nullable = false)
	private CityType cityType;

	public Settlement getSettlement() {
		return settlement;
	}

	public void setSettlement(Settlement settlement) {
		this.settlement = settlement;
	}

	public CityType getCityType() {
		return cityType;
	}

	public void setCityType(CityType cityType) {
		this.cityType = cityType;
	}

	public String getCityCode() {
		return cityCode;
	}

	public void setCityCode(String cityCode) {
		this.cityCode = cityCode;
	}
}